package com.ideaction.entity.giftcode;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@Document
public class CodeUse {
    
    @Id
    private String userId;
    
    List<UseCodeBean> usedCodeList = new ArrayList<>();
    
    private Date useTime;
    
    public CodeUse(String userId) {
        this.userId = userId;
        useTime = new Date();
    }
}
